home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / wildcat / wc30rec.zip / WC30REC.NEW < prev   
Text File  |  1992-12-18  |  20KB  |  513 lines

  1. FILER 5.4x COMPATIBILITY
  2. ------------------------
  3.  
  4. TurboPower has recently introduced a new version of Btree Filer that is
  5. incompatable with the Filer 5.2x that Wildcat and it's various utilities
  6. are built with. Filer 5.4x must be patched in order to work properly with
  7. Wildcat. The new version of Filer automatically determines workstation
  8. numbers while Wildcat bases workstation numbers on the node id. Here are
  9. the changes that allow the new Filer to work with Wildcat:
  10.  
  11. In FILER.PAS add the following:
  12.  
  13. const
  14.   IsamWSNr : Word = 0;
  15.  
  16. Replace the routines IsamRelaseLocalWSNr and IsamDetermineLocalWSNR in
  17. ISAMNWRK.INC with following routines:
  18.  
  19.   procedure IsamReleaseLocalWSNr(FHandle, LocalWSNr : Word);
  20.   begin
  21.     IsamOk := True;
  22.   end;
  23.  
  24.   procedure IsamDetermineLocalWSNr(FHandle : Word; var LocalWSNr : Word);
  25.   begin
  26.     if IsamWSNr = 0 then begin
  27.       IsamOK := False;
  28.       IsamError := 10306;
  29.     end else begin
  30.       IsamOk := True;
  31.       LocalWSNr := IsamWSNr;
  32.     end;
  33.   end;
  34.  
  35. NOTE: It will be necessary to initialize IsamWSNr with the NodeId of the
  36. current node before called BtInitIsam.
  37.  
  38. 3.5 UPDATE INFORMATION
  39. ----------------------
  40.  
  41. The Wildcat 3.50 release has made changes to one of the keys in the message
  42. database. Key #4 has changed in length from 4 bytes in the previous versions
  43. to 21 bytes in the new version. Any utility which updates the message database
  44. keys will have to use the new routines to work properly with 3.50.
  45.  
  46. The following routines in our samples files have been updated to support
  47. the new keys:
  48.  
  49. BTREEO  - OpenMessageDatabase
  50. MSGUTIL - BuildMsgKey
  51.  
  52. The new code now builds key #4 by packing the subject and then adding the
  53. message number to the end of the key.
  54.  
  55.  
  56. NOTICE
  57. ------
  58. Wildcat! has undergone a MAJOR REVISION with version 3.0. Like every version
  59. since version 1.0, it is faster and requires less memory then it predecessor.
  60. These improvements do come at a cost however. The cost is any 3rd party
  61. utility written for Wildcat! will have to be rewritten to support the
  62. new structures and file naming conventions.
  63.  
  64. Wildcat! utilitizes file and record locking in both the M and the P versions.
  65. This means that utilities for these versions can be designed to run while
  66. other Wildcat! nodes are up.
  67.  
  68. These structures the same for all 3 versions of Wildcat!.('S', 'M', 'P').
  69.  
  70.  
  71. USING THIS FILE
  72. ---------------
  73. This file contains a description of each of the sample pascal files
  74. enclosed for accessing the Wildcat! databases. Also included is information
  75. on the third party toolkits used by Mustang Software when writing Wildcat!.
  76. A tutorial describing the utilization of the new Flags and BitSets used in
  77. 3.0. Plus information on the door file formats.
  78.  
  79.  
  80. TOOLBOXES
  81. ---------
  82. If you want to write full blown Wildcat! utilities, then you'll need to
  83. purchase the same B-Tree file management package used by us. The package
  84. is called B-Tree Filer, and may be purchased directly from:
  85.  
  86.   Turbo Power Software
  87.   P.O. Box 49009
  88.   Colorado Springs, CO  80949-9009
  89.  
  90.   Office (719) 260-6641
  91.   Orders (800) 333-4160
  92.   Fax    (719) 260-4160
  93.  
  94.   CompuServe 72457,2131
  95.  
  96. Please be sure to mention you're a Wildcat! Sysop when placing
  97. your order and ask them about the Wildcat! Sysop Special.
  98.  
  99.  
  100. SPECIAL NOTES FOR DEVELOPERS USING TURBO PROFESSIONAL OR BTREE FILER
  101. --------------------------------------------------------------------
  102.  
  103.   Turbo Professional & Object Professional
  104.   ----------------------------------------
  105.   The FourByteDates define in TPRO & OPRO must be disabled for to
  106.   access the date and time fields in Widlcat! 3.0. Failure to do so
  107.   will return the wrong size of your data structure.
  108.  
  109.   Filer
  110.   -----
  111.   The settings in Btree Filer must be exactly like these listed in order
  112.   for Filer to function properly with Wildcat!:
  113.  
  114.   MaxNrOfKeys = 10;
  115.   MaxKeyLen = 30;
  116.   MaxNrOfWorkStations = 250;
  117.   DatExtension = 'DAT';
  118.   IxExtension = 'IX';
  119.   DiaExtension = 'DIA';
  120.   SavExtension = 'SAV';
  121.   MsgExtension = 'MSG';
  122.  
  123.   NOTE: The WordToKey, Pack6bitKeyUC routines used to pack the keys in the
  124.         database come from NumKeys unit that is distributed with Filer.
  125.  
  126.  
  127.   Async Professional
  128.   ------------------
  129.   Turbo Power has also released a set of Async tools for Turbo Pascal.
  130.   These tools are great for writing doors and other 3rd party
  131.   utilities for WILDCAT! which require async routines.
  132.  
  133.  
  134. GLOTYPE.PAS
  135. -----------
  136. This file contains the actual Wildcat 3.0 Turbo Pascal structures. It makes
  137. the assumption that you have the Turbo Professional and B-Tree Filer
  138. libraries from TurboPower Software. Here are the types from the TpDate
  139. and Filer units for those of your that don't have these libraries:
  140.  
  141.    TpDate Types
  142.    ------------
  143.    This unit is from Turbo Powers Turbo Professional. It contains the
  144.    julian date and time routines used throughout Wildcat!. Here are the
  145.    required type declarations for those of you that don't have Turbo
  146.    Professional:
  147.  
  148.    type
  149.      Date : Word;    {number of days since 1/1/1900}
  150.      Time : LongInt; {number of seconds since midnight}
  151.  
  152.      DateTimeRec = record {record containing a date/time value}
  153.                      D : Date;
  154.                      T : Time;
  155.                    end;
  156.  
  157.      NOTE: OPRO/TPRO Users: WILDCAT! uses 2 byte date formats.
  158.  
  159.  
  160.    Filer
  161.    -----
  162.    type
  163.      NetSupportType = (NoNet, Novell, MsNet);
  164.  
  165.  
  166.    AutoNode Generation
  167.    -------------------
  168.  
  169.    AUTONODE.DAT is a file of Bytes.  Position Zero (0) is Node 1.
  170.    The Byte is used as bitflags:
  171.  
  172.    const
  173.    anCanAutoAssign = $01;   { Can be assigned if not current in use }
  174.    anInUse         = $02;   { is currently in use }
  175.  
  176.  
  177.    Node Numbers
  178.    ------------
  179.  
  180.  
  181.    Due to a way Filer initializes the ISAMWSNR and returns the actual
  182.    workstation number under Novell, all 3rd party developers should
  183.    take care when initializing BTREE FILER.  Here is the correct
  184.    method:
  185.  
  186.  
  187.   procedure InitializeBtree;
  188.   var
  189.     PageStackSize  : LongInt;
  190.   begin
  191.     {- If AutoNode feature is turn on, get next node number from AUTONODE.DAT}
  192.     if mwFlagSet(mwAutoid) and (Cfig.Nodeid = 0) then
  193.     Cfig.Nodeid := GetNextAutoNode;
  194.     if (Cfig.NodeId = 0) then
  195.       LogFatalError('Error getting node id number', 9003);
  196.  
  197.     {-Set Filers IsamWSNr}
  198.     IsamWSNr := Cfig.NodeId;
  199.     PageStackSize := BTInitIsam(Cfig.Network, MinimizeUseOfNormalHeap, 0);
  200.  
  201.     { **REQUIRED** Reset in case Filer changed it to the actual WorkStation ID }
  202.     IsamWSNr := Cfig.NodeId;
  203.     if (not IsamOK) then
  204.       begin
  205.         WriteLn('Insufficient memory for pagestack ', IsamError);
  206.         Halt;
  207.       end;
  208.     if (not BTSetVariableRecBuffer(512)) then
  209.       begin
  210.         WriteLn('Insufficient memory for record buffer ', IsamError);
  211.         Halt;
  212.       end;
  213.   end;
  214.  
  215.  
  216.    Flags
  217.    -----
  218.    Wildcat! 3.0 has moved many boolean fields into packed bitfields to
  219.    save space. Here are a few sample routines for accessing a word
  220.    based flag. To use with other data types all that is requires is
  221.    to change the type from Byte to the desired type.
  222.  
  223.    function ByteFlagIsSet(Flag : Byte; Mask : Byte) : Boolean;
  224.      {-Determine is flags set in Mask are set in Flag}
  225.    begin
  226.      FlagIsSet := Flag and Mask = Mask;
  227.    end;
  228.  
  229.    procedure SetByteFlag(var Flag : Byte; Mask : Byte);
  230.      {-Set flags contained in Mask in variable passed in Flag}
  231.    begin
  232.      Flag := Flag or Mask;
  233.    end;
  234.  
  235.    procedure ToggleByteFlag(var Flag : Byte; Mask : Byte);
  236.      {-Toggle flags contained in Mask in variable passed in Flag}
  237.    begin
  238.      Flag := Flag xor Mask;
  239.    end;
  240.  
  241.    procedure ClearByteFlag(var Flag : Byte; Mask : Byte);
  242.      {-Clear flags contained in Mask in variable passed in Flag}
  243.    begin
  244.      Flag := Flag and not Mask;
  245.    end;
  246.  
  247.  
  248.    BitSets
  249.    -------
  250.    Wildcat! utilizies bitsets to reduce memory requirements. Instead of
  251.    having a huge structure containing an array of boolean type we pack
  252.    each of the booleans down into individual bits in a byte. This allows
  253.    us to save much storage. Here are some example routines access these
  254.    bitsets. These examples utilized the functions from the flags example
  255.    above.
  256.  
  257.    type
  258.      ByteArrayPtr = ^ByteArray;
  259.      ByteArray = array[0..65520] of Byte;
  260.  
  261.    function BitIsSet(BPtr : ByteArrayPtr; Element : Word) : Boolean;
  262.    begin
  263.      BitIsSet := ByteFlagIsSet(BPtr^[Element shr 3], 1 shl (Element and 7));
  264.    end;
  265.  
  266.    procedure SetBit(BPtr : ByteArrayPtr; Element : Word);
  267.    begin
  268.      SetByteFlag(BPtr^[Element shr 3], 1 shl (Element and 7));
  269.    end;
  270.  
  271.    procedure ClearBit(BPtr : ByteArrayPtr; Element : Word);
  272.    begin
  273.      ClearByteFlag(BPtr^[Element shr 3], 1 shl (Element and 7));
  274.    end;
  275.  
  276.  
  277. BTREEO.PAS
  278. ----------
  279. This unit contains source code for opening and creating the Wildcat!
  280. databases uses B-Tree Filer. This unit by itself will not compile but
  281. should contain enough code to show you how to open the databases.
  282.  
  283.  
  284. BTREEU.PAS
  285. ----------
  286. This unit contains source code for adding, updating, and deleting user
  287. records from the Wildcat! databases using B-Tree Filer. This unit by itself
  288. will not compile but should contain enough code to show you how to
  289. utilize the user database.
  290.  
  291.  
  292. BTREEF.PAS
  293. ----------
  294. This unit contains source code for adding, updating, and deleting file
  295. records from the Wildcat! databases using B-Tree Filer. This unit by itself
  296. will not compile but should contain enough code to show you how to
  297. utilize the file database.
  298.  
  299.  
  300. MSGUTIL.PAS
  301. -----------
  302. This unit contains source code for adding, updating, and deleting message
  303. records from the Wildcat! databases using B-Tree Filer. This unit by itself
  304. will not compile but should contain enough code to show you how to
  305. utilize the message database.
  306.  
  307.    Special considerations
  308.    ----------------------
  309.    The text in a message is now stored in an array of bytes. Each line
  310.    is deliminated with a carriage return ascii 13 character. The end of the
  311.    entire message text is delminated with a control Z ascii 26 character.
  312.    Wildcat! requires that no line in the message base be longer the 79
  313.    characters not including the 13 character. The MsgBytes field contains the
  314.    number of characters stored in the text array including the final control
  315.    z character.
  316.  
  317.    The contents of the old MESSAGE.DAT have been moved to the first record
  318.    of the message database. (RefNr = 1) The only enforced requirement is
  319.    to make sure the Len field of this MsgStatusType always be iniatialized
  320.    with the value of 12. Also this record should be read with BtGetRec and
  321.    updated with BtPutRec utilizing a RefNr of 1 instead of using the
  322.    coresponding routines in the Filer VRec unit. If the VRec routines
  323.    are used the database will become corrupted.
  324.  
  325.  
  326. BTREEL.PAS
  327. ----------
  328. This unit contains miscellaneous routines utilizing B-Tree Filer routines
  329. under record and file locking conditions. This unit by itself will not
  330. compile but should contain enough code to show you how to use B-Tree Filer
  331. under networking conditions.
  332.  
  333.  
  334. DOOR STRUCTURES
  335. ---------------
  336. With the release of v3.0 Wildcat! no longer creates CALLINFO.BBS.  The
  337. decision to drop CALLINFO.BBS came about due to our desire to support
  338. the generic DOOR.SYS format used by RBBS/GAP & PCBOARD.
  339.  
  340. However, DOOR.SYS doesn't contain all the information necessary for
  341. Wildcat! v3.0.  Therefore, we also create a file called USERINFO.DAT
  342. which gets created in the \WCWORK\NODEx (x = Node Number) directory.
  343. This is a standard text file.
  344.  
  345. Here is the format for our new USERINFO.DAT file:
  346.  
  347.    Jim Harrer       { Line  1 - Full Users Name }
  348.    LOCAL            { Line  2 - Connect Rate or LOCAL }
  349.    8                { Line  3 - Databits }
  350.    Y                { Line  4 - 'Y' or 'N' for Ansi Enabled }
  351.    Y                { Line  5 - 'Y' or 'N' for MNP Connection }
  352.    14:22 02/22/91   { Line  6 - Time and Date of Call }
  353.    14:28 02/22/91   { Line  7 - Time and Date entered door }
  354.    52               { Line  8 - Minutes remaining }
  355.    N                { Line  9 - Started with a CommandLine switch }
  356.    0                { Line 10 - Current Conference }
  357.    0                { Line 11 - Active Menu # (0=Main,1=Msg,2=File,3=Sysop)}
  358.    NEWUSER          { Line 12 - Security level name }
  359.    60               { Line 13 - Banked time.  (DLT - MaxLogOn) }
  360.    1                { Line 14 - Door number }
  361.    THEBOSS          { Line 15 - Alias Name, if they have one }
  362.    N                { Line 16 - 'Y' or 'N' did the caller hang-up in door }
  363.    0                { Line 17 - # of files downloaded }
  364.    0                { Line 18 = # of Kilobytes downloaded }
  365.  
  366.  
  367.  
  368.            =======================================================
  369.  
  370.                        Here is the format for DOOR.SYS
  371.  
  372.            =======================================================
  373.  
  374.  
  375.          03/14/88 - Submitted by the "Limited Release Software Group"
  376.  
  377. Updated: 03/21/88
  378. Updated: 10/22/88  KG
  379. Updated: 07/07/90  KG, to add additional info for Raymond Clements
  380. Updated: 07/14/91  Note to developers added by Jim Harrer/Mustang Software.
  381.  
  382. =============================================================================
  383.  
  384. Sample DOOR.SYS file to be used as a STANDARD for ALL Bulletin Board Systems.
  385.  
  386. =============================================================================
  387.  
  388.   This file format has been laid out and will be presented to ALL BBS authors
  389. in an attempt to establish a national standard for door program applications.
  390.  
  391. BBS AUTHORS: I urge you to consider this STANDARD with respect for your 3rd
  392.              party support authors. Come on guys, make life EASY for us.
  393.                                                                 (BIG GRIN)
  394.  
  395. =============================================================================
  396.  
  397.   I have tried to include EVERYTHING a 3rd party DOOR author would need to
  398. provide the SYSOPS with the look and feel they want from an online program
  399. while at the same time keeping things plain and simple to ease the problems
  400. of interfacing programs with a system.
  401.  
  402. This type of format is intended to be a "read-only" type of file
  403. (although it could be written again) because most BBS's have some sort
  404. of other file they use for re-entering the system with (PCBoard uses
  405. PCBOARD.SYS) which is harder to read in, and changes frequently.
  406. This file format, once established, wouldn't need to be changed EVERYTIME
  407. a new version of the BBS software gets released and this would also
  408. ease the demand for more info being made available in the BBS Re-Entry
  409. file thus making life easier for both parties. If there is something
  410. found in the following format that your BBS software may not be currently
  411. supporting, a DEFAULT value has been suggested.
  412.  
  413. ----------
  414. KG, Note:
  415.  
  416.    GAP DOES treat this file as Read/Write since GAP does not use
  417. or have any use for a Door File. GAP will re-read the DOOR.SYS upon
  418. return from a door. But not all fields are re-read. Only those fields
  419. that are marked with an '*' will be read by GAP when a caller returns
  420. from a door.
  421.  
  422.    When reading this file, you should not go into an EOF loop. In
  423. other words, you should not read until you encounter End Of File.
  424. Instead, you should read what you KNOW is there. This allows for
  425. additions to the end of the file without forcing all programs to be
  426. re-compiled.
  427.  
  428. ----------
  429. Note from Jim Harrer:
  430.  
  431.    Beginning with WILDCAT! release 3, we will begin supporting this DOOR.SYS
  432. Standard by creating this file in the \WC30\WCWORK\NODEx (x = Node Number)
  433. directory.  We will NOT read this file back in.  If DOORS wish to change
  434. any of the callers variables, then the door author should refer to our
  435. USERINFO.DAT standard.
  436.  
  437.    Mustang Software will not support any future changes to DOOR.SYS.  Other
  438. BBS authors must regard this DOOR.SYS as a "Standard" and not change or
  439. add to it in any way.  DOOR authors can be assured we will not change
  440. DOOR.SYS in the future.  Any changes we need to make will be done to our
  441. USERINFO.DAT standard.
  442.  
  443.    I hope other BBS authors will join us in agreement of not making any
  444. additional changes to DOOR.SYS in the future.
  445.  
  446. ----------
  447. DOOR.SYS
  448. --------
  449. COM1:             <-- Comm Port - COM0: = LOCAL MODE
  450. 2400              <-- Baud Rate - 300 to 38400
  451. 8                 <-- Parity - 7 or 8
  452. 1                 <-- Node Number - 1 to 99                    (Default to 1)
  453. 19200             <-- DTE Rate. Actual BPS rate to use. (kg)
  454. Y                 <-- Screen Display - Y=On  N=Off             (Default to Y)
  455. Y                 <-- Printer Toggle - Y=On  N=Off             (Default to Y)
  456. Y                 <-- Page Bell      - Y=On  N=Off             (Default to Y)
  457. Y                 <-- Caller Alarm   - Y=On  N=Off             (Default to Y)
  458. Rick Greer        <-- User Full Name
  459. Lewisville, Tx.   <-- Calling From
  460. 214 221-7814      <-- Home Phone
  461. 214 221-7814      <-- Work/Data Phone
  462. PASSWORD          <-- Password
  463. 110              *<-- Security Level
  464. 1456              <-- Total Times On
  465. 03/14/88          <-- Last Date Called
  466. 7560              <-- Seconds Remaining THIS call (for those that particular)
  467. 126               <-- Minutes Remaining THIS call
  468. GR                <-- Graphics Mode - GR=Graph, NG=Non-Graph, 7E=7,E Caller
  469. 23                <-- Page Length
  470. Y                 <-- User Mode - Y = Expert, N = Novice
  471. 1,2,3,4,5,6,7     <-- Conferences/Forums Registered In  (ABCDEFG)
  472. 7                 <-- Conference Exited To DOOR From    (G)
  473. 01/01/99          <-- User Expiration Date              (mm/dd/yy)
  474. 1                 <-- User File's Record Number
  475. Y                 <-- Default Protocol - X, C, Y, G, I, N, Etc.
  476. 0                *<-- Total Uploads
  477. 0                *<-- Total Downloads
  478. 0                *<-- Daily Download "K" Total
  479. 999999            <-- Daily Download Max. "K" Limit
  480. 10/22/88          <-- Caller's Birthdate                              (kg)
  481. G:\GAP\MAIN       <-- Path to the MAIN directory (where User File is) (kg)
  482. G:\GAP\GEN        <-- Path to the GEN directory                       (kg)
  483. Michael           <-- Sysop's Name (name BBS refers to Sysop as)      (kg)
  484. Stud              <-- Alias name                                      (rc)
  485. 00:05             <-- Event time                        (hh:mm)       (rc)
  486. Y                 <-- If its an error correcting connection (Y/N)     (rc)
  487. N                 <-- ANSI supported & caller using NG mode (Y/N)     (rc)
  488. Y                 <-- Use Record Locking                    (Y/N)     (rc)
  489. 14                <-- BBS Default Color (Standard IBM color code, ie, 1-15) (rc)
  490. 10               *<-- Time Credits In Minutes (positive/negative)     (rc)
  491. 07/07/90          <-- Last New Files Scan Date          (mm/dd/yy)    (rc)
  492. 14:32             <-- Time of This Call                 (hh:mm)       (rc)
  493. 07:30             <-- Time of Last Call                 (hh:mm)       (rc)
  494. 6                 <-- Maximum daily files available                   (rc)
  495. 3                *<-- Files d/led so far today                        (rc)
  496. 23456            *<-- Total "K" Bytes Uploaded                        (rc)
  497. 76329            *<-- Total "K" Bytes Downloaded                      (rc)
  498. A File Sucker     <-- User Comment                                    (rc)
  499. 10                <-- Total Doors Opened                              (rc)
  500. 10283             <-- Total Messages Left                             (rc)
  501.  
  502.  
  503.   *****  Each line is STRAIGHT ASCII TEXT with a CR/LF at the end.  *****
  504.  
  505.   Lines marked with an '*' will be re-read in GAP when a caller
  506.   returns from a door.
  507.  
  508.   Rick Greer, the author of this Universal Specification, is no
  509.   where to be found!
  510.  
  511.  
  512.                                      -EOF-
  513.